package main

import (
	"log"
	"yundian/internel/app/models/users"
	"yundian/internel/app/models/wifimodel"
	"yundian/internel/pkg/dbs"
	"yundian/internel/pkg/dingo"
	"yundian/internel/pkg/dingo/global"
)

func main()  {
	dingo.InitViper("./configs/adm.yaml")
	dbs.NewMysqlComponent().Step()
	dbs.NewRedisComponent().Step()

	sql := `SELECT * FROM wifi_ad_income_log WHERE date_str = '2022-09-27' and user_id <= 10000 and user_id > 2`
	var lists []*wifimodel.AdIncomeModel
	global.Orm.Debug().Raw(sql).Find(&lists)
	for _, lst := range lists {
		//log.Println(lst.UserId)
		s := `SELECT * FROM wifi_user WHERE id = ?`
		info := &users.WifiUser{}
		global.Orm.Raw(s, lst.UserId).Find(info)
		log.Println(info.UserId, info.ParentId)
		if info.UserId > 0 {
			u := `UPDATE wifi_ad_income_log SET user_id = ? WHERE id = ?`
			global.Orm.Exec(u, info.UserId, lst.Id)
		}
	}
	//logic.NewWifiUserLogic().UpdateUserToWifiUser()

	//var dateList []string
	//dateStr := time.Now().AddDate(0, 0, -1).Format("2006-01-02")
	//dateList = append(dateList, dateStr)
	//logic.NewTaskStatisticsUserLogic().StatisticsByTypeByHaveOrders(dateList) // 动销

	//dateStr := time.Now().AddDate(0, 0, -15).Format("2006-01-02")
	//log.Println(dateStr)

	//logic.NewTaskRefundLogic().UpdateUserChildPlaceIsBusinessStatus(405886)
	//logic.NewTaskRefundLogic().UpdateUserChildPlaceIsBusinessStatus(848)
	//logic.NewTaskRefundLogic().UpdateUserChildPlaceIsBusinessStatus(221)
	//logic.NewTaskRefundLogic().UpdateUserChildPlaceIsBusinessStatus(219)
	//logic.NewTaskRefundLogic().UpdateUserChildPlaceIsBusinessStatus(217)
	//logic.NewTaskRefundLogic().UpdateUserChildPlaceIsBusinessStatus(404520)

	//dateStr := time.Now().AddDate(0, 0, -4).Format("2006-01-02")
	//log.Println(dateStr)
	// 抽单
	//logic.NewTaskRefundLogic().BranchTranOrderToRefundByDraw()
	//logic.NewTaskRefundLogic().TranOrderToRefundByNoDraw()


	//dingo.InitViper("./configs/adm.yaml")
	//dbs.NewMysqlComponent().Step()

	//beginTime, endTime := wechatpay.GetLastMonthStartEnd()
	//t := wechatpay.StrJoin("orders_", time.Now().AddDate(0, -1, 0).Format("2006_01"))
	//logic.NewTaskLogic().GetOrderCacheByMonth(beginTime, endTime, t)
	//
	//
	//beginTimeNow, endTimeNow := wechatpay.GetNowMonthStartEnd()
	//tNow := wechatpay.StrJoin("orders_", time.Now().Format("2006_01"))
	//logic.NewTaskLogic().GetOrderCacheByMonth(beginTimeNow, endTimeNow, tNow)


	//dingo.InitViper("./configs/adm.yaml")
	//dbs.NewMysqlComponent().Step()
	//logic.NewTaskLogic().AgentIncomeStatistics(15, "pcl")
	//logic.NewTaskLogic().AgentIncomeStatisticsByDay("2021-07-12", "pcl")


	//days := []string{"2021-07-21", "2021-07-22", "2021-07-23", "2021-07-24", "2021-07-25"}
	//for _, day := range days {
	//	logic.NewTaskLogic().SeparateAgentIncomeStatistics(day, "pcl")
	//}

	//logic.NewTaskLogic().SeparatePlaceIncomeStatistics("pcl","2021-07-21")

	//logic.NewTaskLogic().SeparateAgentIncomeStatistics("2021-07-21", "pcl")

	//logic.NewTaskLogic().PlacesInsertPrices(471) // 批量修改携程酒店价格


	// 批量修改计时价格
	// 东呈项目总帐号 403739   胜高项目总帐号 403737  锦江项目总帐号 403736
	//logic.NewTaskLogic().PlacesInsertPricesToJishi(403739)
	//logic.NewTaskLogic().PlacesInsertPricesToJishi(403737)
	//logic.NewTaskLogic().PlacesInsertPricesToJishi(403736)




	//p1 := "1424,1424,20992,31079,31483,31484,31577,31578,31726,31877,32030,32290,441623,441648,441817,441825,441875,441949," +
	//	"442035,442076,442086,442115,442286,442353,442395,442395,442460,442461,442462,442463,442464,442466,442467,442468," +
	//	"442470,442470,442471,442473,442474,442476,442477,442478,442479,442504,442529,442596,442597,442637,442639,442649," +
	//	"442787,442878,443016,443036,443056,443080,443082,443087,443089,443094,443101,443158,443185,443187,443221,443230," +
	//	"443277,443284,443285,443286,443328,443329,443344,443345,443347,443388,443405,443406,443409,443410,443414,443415," +
	//	"443424,443425,443426,443427,443428,443429,443430,443457,443471,443472,443503,443505,443506,443507,443508,443509," +
	//	"443509,443513,443514,443515,443518,443519,443581,443582,443583,443584,443586,443587,443588,443589,443619,443620," +
	//	"443621,443622,443626,443630,443643,443661,443687,443696,443701,443701,443707,443719,443725,443728,443729,443767," +
	//	"443769,443771,443793,443819,443820,443821,443822,443823,443825,443826,443828,443845,443845,443848,443854,443862," +
	//	"443864,443866,443908,443909,443910,443912,443930,443931,443932,443975,443975,443977"
	//p2 := "443979,443980,443984,443997,443998,443999,444001,444003,444004,444005,444006,444007,444008,444010,444011,444014," +
	//	"444015,444030,444041,444042,444044,444046,444048,444049,444050,444051,444052,444053,444054,444055,444067,444070," +
	//	"444071,444072,444075,444105,444110,444113,444119,444120,444121,444122,444129,444130,444132,444140,444141,444143," +
	//	"444146,444151,444153,444153,444155,444177,444204,444212,444214,444215,444216,444217,444218,444219,444220,444221," +
	//	"444227,444255,444260,444280,444281,444295,444299,444320,444321,444322,444323,444329,444331,444332,444333,444333,444334," +
	//	"444393,444405,444406,444431,444446,444452,444453,444455,444481,444499,444500,444503,444523,444524,444525,444529,444530," +
	//	"444535,444543,444549,444559,444560,444564,444578,444593,444598,444611,444615,444645,444769,444804,444833,444897,444903," +
	//	"444915,444918,444930,444939,444986,444986,445001,445003,445012,445015"
	//var placeIds []string
	//
	//placeIds = strings.Split(p2, ",")
	//logic.NewTaskLogic().PlacesInsertPricesToJishiByPlaceId(placeIds)


//	c := `441618,441619,441619,441620,441620,441621,441621,441624,441624,441625,441625,441626,441626,441627,441627,441628,441628,441629,441629,441632,441632,441635,441635,441636,441636,441637,441637,441638,441638,441639,441639,441640,441640,441641,441641,441642,441642,441643,441643,441644,441644,441645,441645,441647,441647,441649,441649,441650,441650,441651,441651,441653,441653,441654,441654,441655,441655,441657,441657,441658,441658,441660,441660,441661,441661,441662,441662,441665,441665,441666,441666,441669,441669,441670
//,441670,441671,441671,441672,441672,441674,441674,441675,441675,441676,441676,441679,441679,441680,441680,441681,441681,441682,441682,441683,441683,441685,441685,441686,441686,441687,441687,441689,441689,441690,441690,441691,441691,441692,441692,441693,441693,441695,441695,441696,441696,441697,441697,441698,441698,441699,441699,441700,441700,441701,441701,441702,441702,441703,441703,441704,441704,441706,441706,441707,441707,441708,441708,441709,441709,441710,441710,441711,441711,441712,441712,441713,441713,441715,441715,441716
//,441716,441718,441718,441720,441720,441721,441721,441722,441722,441725,441725,441726,441726,441727,441727,441728,441728,441729,441729,441730,441730,441731,441731,441732,441732,441733,441733,441734,441734,441736,441736,441737,441737,441738,441738,441739,441739,441740,441740,441741,441741,441742,441742,441743,441743,441744,441744,441746,441746,441747,441747,441748,441748,441749,441749,441750,441750,441752,441752,441753,441753,441754,441754,441755,441755,441756,441756,441757,441757,441758,441758,441759,441759,441760,441760,441761
//,441761,441762,441762,441763,441763,441764,441764,441765,441765,441767,441767,441768,441768,441769,441769,441770,441770,441771,441771,441772,441772,441773,441773,441774,441774,441776,441776,441777,441777,441778,441778,441780,441780,441781,441781,441782,441782,441783,441783,441784,441784,441785,441785,441786,441786,441788,441788,441789,441789,441790,441790,441791,441791,441792,441792,441793,441793,441794,441794,441795,441795,441796,441796,441797,441797,441798,441798,441799,441799,441800,441800,441801,441801,441802,441802,441803
//,441803,441804,441804,441805,441805,441806,441806,441807,441807,441808,441808,441809,441809,441810,441810,441811,441811,441813,441813,441814,441814,441815,441815,441816,441816,441818,441818,441819,441819,441820,441820,441821,441821,441822,441822,441823,441823,441824,441824,441826,441826,441827,441827,441828,441828,441829,441829,441830,441830,441831,441831,441832,441832,441833,441833,441834,441834,441836,441836,441837,441837,441838,441838,441839,441839,441841,441841,441843,441843,441844,441844,441845,441845,441847,441847,441848
//,441848,441849,441849,441850,441850,441851,441851,441852,441852,441853,441853,441854,441854,441855,441855,441856,441856,441857,441857,441858,441858,441859,441859,441860,441860,441861,441861,441862,441862,441863,441863,441864,441864,441868,441868,441869,441869,441870,441870,441871,441871,441872,441872,441873,441873,441874,441874,441876,441876,441877,441877,441878,441878,441879,441879,441880,441880,441881,441881,441882,441882,441883,441883,441884,441884,441885,441885,441886,441886,441887,441887,441888,441888,441890,441890,441891
//,441891,441893,441893,441894,441894,441895,441895,441896,441896,441897,441897,441898,441898,441899,441899,441901,441901,441902,441902,441903,441903,441904,441904,441905,441905,441906,441906,441907,441907,441908,441908,441909,441909,441910,441910,441911,441911,441912,441912,441913,441913,441914,441914,441915,441915,441916,441916,441917,441917,441918,441918,441919,441919,441920,441920,441921,441921,441922,441922,441923,441923,441924,441924,441925,441925,441927,441927,441928,441928,441929,441929,441930,441930,441931,441931,441932
//,441932,441933,441933,441935,441935,441936,441936,441937,441937,441938,441938,441940,441940,441941,441941,441943,441943,441944,441944,441945,441945,441946,441946,441948,441948,441950,441950,441951,441951,441952,441952,441953,441953,441954,441954,441955,441955,441956,441956,441957,441957,441958,441958,441959,441959,441960,441960,441961,441961,441962,441962,441963,441963,441964,441964,441965,441965,441966,441966,441967,441967,441968,441968,441969,441969,441970,441970,441971,441971,441974,441974,441975,441975,441976,441976,441977
//,441977,441978,441978,441979,441979,441980,441980,441981,441981,441982,441982,441983,441983,441984,441984,441985,441985,441986,441986,441987,441987,441994,441994,441995,441995,441996,441996,441997,441997,441998,441998,441999,441999,442000,442000,442001,442001,442003,442003,442005,442005,442006,442006,442007,442007,442009,442009,442010,442010,442011,442011,442012,442012,442013,442013,442015,442015,442016,442016,442017,442017,442018,442018,442020,442020,442021,442021,442022,442022,442023,442023,442025,442025,442026,442026,442028
//,442028,442029,442029,442030,442030,442031,442031,442032,442032,442033,442033,442034,442034,442039,442039,442040,442040,442041,442041,442042,442042,442045,442045,442047,442047,442048,442048,442049,442049,442050,442050,442051,442051,442052,442052,442053,442053,442054,442054,442055,442055,442056,442056,442059,442059,442060,442060,442061,442061,442062,442062,442063,442063,442075,442075,442079,442079,442082,442082,442083,442083,442085,442085,442087,442087,442088,442088,442092,442092,442093,442093,442094,442094,442095,442095,442096
//,442096,442097,442097,442098,442098,442099,442099,442100,442100,442101,442101,442102,442102,442103,442103,442104,442104,442105,442105,442107,442107,442109,442109,442110,442110,442111,442111,442112,442112,442113,442113,442116,442116,442117,442117,442118,442118,442119,442119,442120,442120,442123,442123,442124,442124,442125,442125,442127,442127,442128,442128,442129,442129,442130,442130,442132,442132,442133,442133,442134,442134,442135,442135,442136,442136,442137,442137,442138,442138,442139,442139,442140,442140,442141,442141,442142
//,442142,442143,442143,442144,442144,442145,442145,442147,442147,442148,442148,442149,442149,442150,442150,442151,442151,442152,442152,442153,442153,442154,442154,442155,442155,442156,442156,442157,442157,442158,442158,442160,442160,442161,442161,442162,442162,442164,442164,442165,442165,442166,442166,442167,442167,442168,442168,442171,442171,442172,442172,442173,442173,442174,442174,442175,442175,442177,442177,442178,442178,442179,442179,442181,442181,442183,442183,442184,442184,442185,442185,442187,442187,442188,442188,442191
//,442191,442192,442192,442193,442193,442194,442194,442195,442195,442196,442196,442197,442197,442198,442198,442199,442199,442200,442200,442201,442201,442202,442202,442203,442203,442204,442204,442205,442205,442206,442206,442207,442207,442208,442208,442209,442209,442211,442211,442212,442212,442213,442213,442214,442214,442215,442215,442216,442216,442217,442217,442218,442218,442219,442219,442220,442220,442221,442221,442223,442223,442224,442224,442226,442226,442227,442227,442228,442228,442229,442229,442230,442230,442231,442231,442233
//,442233,442234,442234,442235,442235,442236,442236,442237,442237,442238,442238,442239,442239,442244,442244,442245,442245,442246,442246,442247,442247,442248,442248,442250,442250,442251,442251,442252,442252,442253,442253,442254,442254,442255,442255,442256,442256,442258,442258,442260,442260,442261,442261,442263,442263,442266,442266,442269,442269,442270,442270,442271,442271,442272,442272,442273,442273,442274,442274,442275,442275,442276,442276,442277,442277,442278,442278,442279,442279,442280,442280,442281,442281,442282,442282,442283
//,442283,442284,442284,442310,442310,442311,442311,442312,442312,442313,442313,442314,442314,442315,442315,442316,442316,442317,442317,442318,442318,442319,442319,442320,442320,442321,442321,442322,442322,442324,442324,442325,442325,442326,442326,442327,442327,442329,442329,442332,442332,442345,442345,442347,442347,442349,442349,442350,442350,442351,442351,442354,442354,442355,442355,442356,442356,442357,442357,442358,442358,442359,442359,442360,442360,442361,442361,442362,442362,442363,442363,442364,442364,442365,442365,442366
//,442366,442368,442368,442369,442369,442372,442372,442373,442373,442374,442374,442431,442431,442432,442432,442433,442433,442434,442434,442435,442435,442437,442437,442439,442439,442440,442440,442441,442441,442442,442442,442443,442443,442445,442445,442447,442447,442448,442448,442449,442449,442451,442451,442480,442480,442481,442481,442482,442482,442484,442484,442485,442485,442486,442486,442487,442487,442488,442488,442489,442489,442490,442490,442491,442491,442492,442492,442493,442493,442494,442494,442495,442495,442496,442496,442497
//,442497,442499,442499,442501,442501,442503,442503,442505,442505,442506,442506,442508,442508,442509,442509,442510,442510,442511,442511,442512,442512,442513,442513,442514,442514,442515,442515,442516,442516,442517,442517,442519,442519,442520,442520,442521,442521,442522,442522,442523,442523,442524,442524,442525,442525,442526,442526,442527,442527,442528,442528,442539,442539,442540,442540,442541,442541,442542,442542,442543,442543,442544,442544,442545,442545,442547,442547,442548,442548,442549,442549,442550,442550,442565,442565,442566
//,442566,442569,442569,442570,442570,442571,442571,442572,442572,442573,442573,442574,442574,442575,442575,442576,442576,442577,442577,442578,442578,442580,442580,442581,442581,442582,442582,442583,442583,442584,442584,442585,442585,442586,442586,442588,442588,442601,442601,442613,442613,442614,442614,442615,442615,442616,442616,442617,442617,442618,442618,442619,442619,442620,442620,442621,442621,442622,442622,442624,442624,442625,442625,442626,442626,442627,442627,442628,442628,442630,442630,442631,442631,442632,442632,442633
//,442633,442634,442634,442640,442640,442641,442641,442643,442643,442645,442645,442646,442646,442647,442647,442648,442648,442650,442650,442651,442651,442652,442652,442654,442654,442655,442655,442658,442658,442659,442659,442660,442660,442661,442661,442662,442662,442663
//,442663,442664,442664,442665,442665,442666,442666,442667,442667,442668,442668,442669,442669,442670,442670,442671,442671,442672,442672,442673,442673,442675,442675,442676,442676,442677,442677,442678,442678,442679,442679,442680,442680,442681,442681,442682,442682,442683
//,442683,442684,442684,442685,442685,442686,442686,442687,442687,442688,442688,442689,442689,442690,442690,442691,442691,442692,442692,442693,442693,442694,442694,442695,442695,442696,442696,442697,442697,442698,442698,442699,442699,442700,442700,442701,442701,442702
//,442702,442703,442703,442704,442704,442705,442705,442706,442706,442707,442707,442709,442709,442710,442710,442711,442711,442712,442712,442714,442714,442715,442715,442716,442716,442717,442717,442718,442718,442719,442719,442721,442721,442722,442722,442723,442723,442724
//,442724,442725,442725,442727,442727,442729,442729,442730,442730,442731,442731,442732,442732,442733,442733,442734,442734,442735,442735,442736,442736,442738,442738,442739,442739,442740,442740,442741,442741,442742,442742,442743,442743,442744,442744,442745,442745,442746
//,442746,442747,442747,442748,442748,442749,442749,442750,442750,442751,442751,442752,442752,442753,442753,442754,442754,442755,442755,442756,442756,442757,442757,442758,442758,442759,442759,442761,442761,442762,442762,442763,442763,442764,442764,442765,442765,442766
//,442766,442767,442767,442768,442768,442769,442769,442771,442771,442772,442772,442773,442773,442774,442774,442775,442775,442776,442776,442777,442777,442778,442778,442780,442780,442781,442781,442782,442782,442829,442829,442830,442830,442832,442832,442833,442833,442835
//,442835,442836,442836,442838,442838,442839,442839,442840,442840,442844,442844,442845,442845,442846,442846,442847,442847,442848,442848,442849,442849,442850,442850,442851,442851,442852,442852,442853,442853,442855,442855,442856,442856,442857,442857,442858,442858,442859
//,442859,442860,442860,442861,442861,442862,442862,442863,442863,442864,442864,442865,442865,442866,442866,442867,442867,442868,442868,442870,442870,442871,442871,442872,442872,442873,442873,442874,442874,442887,442887,442888,442888,442889,442889,442890,442890,442891
//,442891,442892,442892,442893,442893,442894,442894,442895,442895,442896,442896,442897,442897,442898,442898,442899,442899,442901,442901,442902,442902,442903,442903,442904,442904,442906,442906,442907,442907,442909,442909,442910,442910,442911,442911,442912,442912,442913
//,442913,442914,442914,442915,442915,442916,442916,442917,442917,442920,442920,442921,442921,442924,442924,442925,442925,442926,442926,442927,442927,442928,442928,442929,442929,442930,442930,442931,442931,442932,442932,442933,442933,442934,442934,442935,442935,442936
//,442936,442937,442937,442939,442939,442940,442940,442941,442941,442942,442942,442943,442943,442945,442945,442946,442946,442947,442947,442948,442948,442951,442951,442952,442952,442953,442953,442954,442954,442956,442956,442957,442957,442958,442958,442959,442959,442960
//,442960,442961,442961,442962,442962,442963,442963,442964,442964,442965,442965,442966,442966,442967,442967,442968,442968,442969,442969,442970,442970,442971,442971,442972,442972,442973,442973,442974,442974,442975,442975,442977,442977,442978,442978,442979,442979,442980
//,442980,442981,442981,442982,442982,442983,442983,442985,442985,442987,442987,442988,442988,442989,442989,442991,442991,442992,442992,442993,442993,442994,442994,442995,442995,442996,442996,442997,442997,442998,442998,442999,442999,443000,443000,443001,443001,443002
//,443002,443003,443003,443006,443006,443007,443007,443009,443009,443010,443010,443011,443011,443012,443012,443013,443013,443014,443014,443015,443015,443017,443017,443018,443018,443019,443019,443020,443020,443021,443021,443025,443025,443026,443026,443027,443027,443028
//,443028,443029,443029,443030,443030,443031,443031,443032,443032,443033,443033,443034,443034,443035,443035,443037,443037,443038,443038,443039,443039,443040,443040,443041,443041,443042,443042,443043,443043,443044,443044,443045,443045,443046,443046,443047,443047,443048
//,443048,443049,443049,443050,443050,443051,443051,443052,443052,443053,443053,443054,443054,443055,443055,443057,443057,443058,443058,443059,443059,443060,443060,443061,443061,443062,443062,443063,443063,443064,443064,443065,443065,443067,443067,443068,443068,443069
//,443069,443070,443070,443071,443071,443072,443072,443073,443073,443074,443074,443075,443075,443076,443076,443077,443077,443078,443078,443079,443079,443081,443081,443083,443083,443086,443086,443097,443097,443098,443098,443099,443099,443100,443100,443103,443103,443104
//,443104,443105,443105,443106,443106,443107,443107,443108,443108,443109,443109,443110,443110,443111,443111,443112,443112,443113,443113,443114,443114,443115,443115,443116,443116,443117,443117,443118,443118,443119,443119,443120,443120,443121,443121,443122,443122,443123
//,443123,443124,443124,443125,443125,443126,443126,443127,443127,443128,443128,443129,443129,443130,443130,443131,443131,443132,443132,443133,443133,443134,443134,443138,443138,443139,443139,443140,443140,443154,443154,443182,443182,443183,443183,443184,443184,443196
//,443196,443197,443197,443198,443198,443199,443199,443200,443200,443202,443202,443203,443203,443204,443204,443205,443205,443206,443206,443207,443207,443208,443208,443210,443210,443211,443211,443212,443212,443213,443213,443214,443214,443216,443216,443217,443217,443218
//,443218,443219,443219,443220,443220,443231,443231,443233,443233,443234,443234,443235,443235,443237,443237,443238,443238,443239,443239,443240,443240,443241,443241,443242,443242,443243,443243,443244,443244,443246,443246,443247,443247,443248,443248,443249,443249,443250
//,443250,443251,443251,443252,443252,443253,443253,443254,443254,443255,443255,443256,443256,443257,443257,443258,443258,443263,443263,443264,443264,443265,443265,443266,443266,443267,443267,443268,443268,443269,443269,443270,443270,443271,443271,443272,443272,443273
//,443273,443274,443274,443276,443276,443278,443278,443279,443279,443280,443280,443281,443281,443283,443283,443308,443308,443309,443309,443310,443310,443311,443311,443313,443313,443314,443314,443315,443315,443316,443316,443318,443318,443319,443319,443320,443320,443359
//,443359,443360,443360,443361,443361,443362,443362,443363,443363,443364,443364,443365,443365,443366,443366,443367,443367,443368,443368,443369,443369,443370,443370,443372,443372,443373,443373,443374,443374,443375,443375,443376,443376,443378,443378,443379,443379,443380
//,443380,443381,443381,443382,443382,443383,443383,443384,443384,443385,443385,443386,443386,443387,443387,443389,443389,443390,443390,443391,443391,443392,443392,443393,443393,443394,443394,443395,443395,443396,443396,443397,443397,443398,443398,443399,443399,443400
//,443400,443401,443401,443417,443417,443418,443418,443419,443419,443421,443421,443422,443422,443423,443423,443431,443431,443432,443432,443434,443434,443436,443436,443437,443437,443438,443438,443439,443439,443440,443440,443441,443441,443442,443442,443443,443443,443444
//,443444,443445,443445,443446,443446,443447,443447,443448,443448,443451,443451,443452,443452,443453,443453,443454,443454,443455,443455,443456,443456,443458,443458,443459,443459,443460,443460,443461,443461,443462,443462,443463,443463,443464,443464,443465,443465,443466
//,443466,443476,443476,443478,443478,443480,443480,443484,443484,443486,443486,443488,443488,443489,443489,443491,443491,443495,443495,443497,443497,443500,443500,443523,443523,443524,443524,443525,443525,443527,443527,443528,443528,443529,443529,443530,443530,443531
//,443531,443532,443532,443533,443533,443534,443534,443535,443535,443536,443536,443537,443537,443538,443538,443539,443539,443540,443540,443541,443541,443542,443542,443543,443543,443544,443544,443545,443545,443546,443546,443547,443547,443548,443548,443549,443549,443550
//,443550,443551,443551,443552,443552,443553,443553,443555,443555,443556,443556,443557,443557,443558,443558,443559,443559,443560,443560,443561,443561,443562,443562,443563,443563,443564,443564,443565,443565,443566,443566,443567,443567,443568,443568,443569,443569,443570
//,443570,443590,443590,443591,443591,443592,443592,443593,443593,443595,443595,443596,443596,443597,443597,443599,443599,443600,443600,443601,443601,443602,443602,443603,443603,443604,443604,443605,443605,443606,443606,443607,443607,443608,443608,443610,443610,443611
//,443611,443612,443612,443613,443613,443614,443614,443615,443615,443616,443616,443617,443617,443631,443631,443632,443632,443633,443633,443635,443635,443636,443636,443637,443637,443638,443638,443639,443639,443645,443645,443646,443646,443647,443647,443648,443648,443649
//,443649,443650,443650,443652,443652,443653,443653,443655,443655,443656,443656,443657,443657,443658,443658,443659,443659,443662,443662,443663,443663,443664,443664,443665,443665,443666,443666,443668,443668,443669,443669,443670,443670,443671,443671,443673,443673,443674
//,443674,443675,443675,443676,443676,443677,443677,443678,443678,443680,443680,443681,443681,443683,443683,443685,443685,443686,443686,443688,443688,443689,443689,443690,443690,443691,443691,443692,443692,443693,443693,443694,443694,443695,443695,443698,443698,443699
//,443699,443700,443700,443702,443702,443703,443703,443730,443730,443731,443731,443732,443732,443733,443733,443734,443734,443735,443735,443737,443737,443738,443738,443739,443739,443740,443740,443741,443741,443742,443742,443743,443743,443744,443744,443745,443745,443746
//,443746,443747,443747,443748,443748,443750,443750,443751,443751,443752,443752,443753,443753,443754,443754,443755,443755,443756,443756,443757,443757,443758,443758,443759,443759,443760,443760,443761,443761,443762,443762,443763,443763,443776,443776,443777,443777,443778
//,443778,443779,443779,443780,443780,443781,443781,443782,443782,443783,443783,443784,443784,443785,443785,443786,443786,443787,443787,443788,443788,443789,443789,443790,443790,443791,443791,443792,443792,443794,443794,443795,443795,443796,443796,443797,443797,443798
//,443798,443799,443799,443800,443800,443801,443801,443802,443802,443803,443803,443804,443804,443805,443805,443806,443806,443807,443807,443809,443809,443810,443810,443811,443811,443812,443812,443813,443813,443814,443814,443815,443815,443816,443816,443817,443817,443818
//,443818,443830,443830,443831,443831,443832,443832,443833,443833,443834,443834,443835,443835,443836,443836,443837,443837,443838,443838,443839,443839,443840,443840,443841,443841,443842,443842,443843,443843,443867,443867,443868,443868,443869,443869,443870,443870,443871
//,443871,443872,443872,443873,443873,443874,443874,443875,443875,443876,443876,443877,443877,443878,443878,443879,443879,443880,443880,443881,443881,443882,443882,443884,443884,443885,443885,443886,443886,443888,443888,443889,443889,443890,443890,443891,443891,443892
//,443892,443895,443895,443897,443897,443898,443898,443899,443899,443900,443900,443901,443901,443902,443902,443903,443903,443914,443914,443915,443915,443916,443916,443917,443917,443918,443918,443920,443920,443921,443921,443922,443922,443923,443923,443935,443935,443936
//,443936,443937,443937,443939,443939,443940,443940,443941,443941,443942,443942,443943,443943,443944,443944,443945,443945,443946,443946,443947,443947,443948,443948,443949,443949,443950,443950,443951,443951,443952,443952,443953,443953,443954,443954,443955,443955,443957
//,443957,443958,443958,443959,443959,443960,443960,443961,443961,443963,443963,443964,443964,443965,443966,443967,443970,443971,443972,443973,443974,444022,444023,444024,444026,444027,444028,444029,444033,444034,444061,444062,444063,444064,444065,444076,444077,444089,444090,444091,,444092,444093,444094,444095,444096,444097,444098,444099,444100,444101,444102,444118,444126,444127,444137,444163,444165,444166,444167,444168,444169,444170,444171,444172,444173,444194,444195,,444196,444197,444198,444199,444200,444201,444202,444203,444205,444206,444215,444216,444217,444218,444219,444220,444229,444230,444231,,444233,4
//44240,444241,444243,444244,444245,444246,444247,444248,444249,444250,444251,444252,444253,444254,444263,444264,444265, 444266,444267,444268,444269,444270,444271,444272,444273,444274,444275,444276,444277,444278,444279,444284,444285,444286,444303,444304,444305,444307,,,444308,444309,444310,444311,444312,444340,444341
//,444343,444344,444350,444351,444352,444353,444355,444356,444358,444359,444360,444361,444362,444363,444364,444365,444366,444367,444380,444381,,444382,444383,444383,444384,444384,444385,444385,444387,444387,444395,444395,444397,444397,444398,444398,444399,444399,444410,444410,444411,444411,444412,444412,444413,444413,444414,444414,444415,444415,444416,444416,444417,444417,444418,444418,444419,444419,444420,444420,444421
//,444421,444422,444422,444423,444423,444433,444433,444434,444434,444435,444435,444436,444436,444437,444437,444438,444438,444439,444439,444440,444440,444441,444441,444443,444443,444444,444444,444445,444445,444457,444457,444458,444458,444459,444459,444460,444460,444461
//,444461,444462,444462,444463,444463,444464,444464,444465,444465,444466,444466,444467,444467,444468,444468,444469,444469,444470,444470,444471,444471,444472,444472,444473,444473,444474,444474,444475,444475,444476,444476,444477,444477,444478,444478,444479,444479,444480
//,444480,444486,444486,444487,444487,444488,444488,444489,444489,444490,444490,444491,444491,444492,444492,444493,444493,444494,444494,444495,444495,444496,444496,444500,444500,444500,444503,444503,444503,444507,444507,444508,444508,444509,444509,444510,444510,444511
//,444511,444512,444512,444513,444513,444514,444514,444515,444515,444516,444516,444517,444517,444518,444518,444536,444536,444537,444537,444538,444538,444539,444539,444543,444543,444543,444544,444544,444545,444545,444546,444546,444547,444547,444548,444548,444550,444550
//,444551,444551,444552,444552,444553,444553,444555,444555,444556,444556,444580,444580,444581,444581,444582,444582,444583,444583,444584,444584,444585,444585,444586,444586,444587,444587,444600,444600,444601,444602,444603,444604,444605,444606,444616,444617,444618,444619,444620,444621,444622,444623,444624,444625,444626,444627,444628,444629,444630,444631,444632,444633,444634,444635,444636,444653,444654,444655,444656,444657,444658,444659,444660,444661,444662,444663,444664,444665,444666,444667,444668,444670,444671,444717,444718,444719,444720,444721,444722,444723,444724,444725,444726,444727,444728,444731,444732,444733,444734,444735,444736,444737,444738,444739,444741`
//
//
//	b := strings.Split(c, ",")
//	a := RemoveRepeatedElement(b)
//
//	logic.NewTaskLogic().PlacesInsertPricesByplaceId(a)

}

//去除重复字符串
func RemoveRepeatedElement(arr []string) (newArr []string) {
	newArr = make([]string, 0)
	for i := 0; i < len(arr); i++ {
		repeat := false
		for j := i + 1; j < len(arr); j++ {
			if arr[i] == arr[j] {
				repeat = true
				break
			}
		}
		if !repeat {
			newArr = append(newArr, arr[i])
		}
	}
	return newArr
}

//
//func agentIncomeStatistics() {
//
//	//userIdArr := dao.NewUserDao().QueryChildUserIds(471).Unwrap().([]int)
//	//placeIdArr := dao.NewPlaceDao().GetPlaceByIds(userIdArr).Unwrap().([]int)
//	//
//	//var userIds string
//	//for _, u := range userIdArr {
//	//	userIds += strconv.Itoa(u) + ","
//	//}
//	//
//	//var placeIds string
//	//for _, p := range placeIdArr {
//	//	placeIds += strconv.Itoa(p) + ","
//	//}
//
//	//logic.NewTaskLogic().AgentIncomeStatistics(2, "pcl")
//
//
//	//param := request.CloseOrderReq{}
//	//dingo.ErrorIf(c.Bind(&param)).Unwrap()
//	//logic.NewOrderLogic().HandleCancelEndOrder(&param)
//	//logic.NewTaskLogic().BranchIncomeStatistics(8, "pcl")
//	//param := &struct {
//	//	StatiTime string `json:"statiTime" form:"statiTime" `
//	//}{}
//	//dingo.ErrorIf(c.Bind(param)).Unwrap()
//	//logic.NewTaskLogic().UpdateOrderStatistics(param.StatiTime)
//	//logic.NewTaskLogic().BranchIncomeStatistics(5, "pcl")
//	//logic.NewTaskLogic().AgentIncomeStatistics(2, "pcl")
//	//userIdArr := dao.NewUserDao().QueryChildUserIds(139).Unwrap().([]int)
//	//
//	//placeModelLst := dao.NewPlaceDao().GetPlaceByParentIds(userIdArr).Unwrap().([]*placemodel.PlaceModel)
//	//placeIdArr := make([]int, 0)
//	//for _, placeModel := range placeModelLst {
//	//	placeIdArr = append(placeIdArr, placeModel.Id)
//	//}
//	//
//	//CompleteCount := dao.NewAgentCountDao().GetAgentTotalOrderCount(139, 1, 5, "pcl").Unwrap().(int64) // 已完成订单数
//	//fmt.Println(CompleteCount, "下级代理", userIdArr, "下级网点", placeIdArr)
//}
